The Color Set ('crst') Resource
The color set ('crst'
) resource is used with raster imaging drivers to specify a set of replacement strings that are used when interpreting the information returned by a printer. This resource is optional.Figure 6-26 shows the structure of a color set resource.
Figure 6-26 The color set resource
The color set resource consists of a number of color values that are defined for a certain color space.
Each color entry in the array consists of up to four integer values. What each value specifies depends on the type of color space, as described in the chapter "Colors and Color-Related Objects" in Inside Macintosh: QuickDraw GX Objects.
- Color space. The color space that the colors are defined for. Use one of the values described in the chapter "Colors and Color-Related Objects" in Inside Macintosh: QuickDraw GX Objects.
- Count. The number of color values defined in the array that follows.
Listing 6-24 shows an example of a color set resource for the ImageWriter II printer driver. This printer uses the RGB color space and defines only 8 colors.
- Color value 1. The first color value.
- Color value 2. The second color value.
- Color value 3. The third color value.
- Color value 4. The fourth color value.
Listing 6-24 An example of a color set resource
resource gxColorSetResType (gxPrintingDriverBaseID, sysHeap, purgeable) { gxRGBSpace, { /* R G B unused */ 0xFFFF,0xFFFF,0xFFFF,0x0000; /* white */ 0xFFFF,0xFFFF,0x0000,0x0000; /* yellow */ 0xFFFF,0x0000,0xFFFF,0x0000; /* magenta */ 0xFFFF,0x0000,0x0000,0x0000; /* red */ 0x0000,0xFFFF,0xFFFF,0x0000; /* cyan */ 0x0000,0xFFFF,0x0000,0x0000; /* green */ 0x0000,0x0000,0xFFFF,0x0000; /* blue */ 0xFFFF,0xFFFF,0xFFFF,0x0000; /* white */ 0x0000,0x0000,0x0000,0x0000; /* black */ }; };.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help